strom_rpca <- readRDS(file.path(PATH, "data/sc/strom_rpca_subset.rds"))
strom_rpca$celltypist_strom_only <- with(strom_rpca@meta.data,
case_when(celltypist_broad == "Stromal" ~ celltypist_pred,
.default = celltypist_broad))
strom_rpca$singler_strom_only <- with(strom_rpca@meta.data,
case_when(singleR_broad == "Stromal" ~ singler_pred,
.default = singleR_broad))
strom_rpca$author_strom_only <- with(strom_rpca@meta.data,
case_when(author_broad == "Stromal" ~ celltype_new,
.default = author_broad))
Idents(strom_rpca) <- strom_rpca$RNA_snn_res.0.4
p1 <- DimPlot_scCustom(strom_rpca,
reduction = "umap.rpca",
group.by = "RNA_snn_res.0.4",
label = TRUE,
label.size = 3,
repel = TRUE,
raster = FALSE) + labs(title = "Clustering (0.4)", x = "UMAP 1", y = "UMAP 2")
p2 <- DimPlot_scCustom(strom_rpca,
reduction = "umap.rpca",
group.by = "celltypist_strom_only",
label = TRUE,
label.size = 1.5,
label.box = TRUE,
repel = TRUE,
raster = FALSE) +
labs(title = "Celltypist", x = "UMAP 1", y = "UMAP 2") +
theme(legend.position = "none")
p3 <- DimPlot_scCustom(strom_rpca,
reduction = "umap.rpca",
group.by = "singler_strom_only",
label = TRUE,
label.size = 1.5,
label.box = TRUE,
repel = TRUE,
raster = FALSE) +
labs(title = "SingleR", x = "UMAP 1", y = "UMAP 2") +
theme(legend.position = "none")
p4 <- DimPlot_scCustom(strom_rpca,
reduction = "umap.rpca",
group.by = "author_strom_only",
label = TRUE,
label.size = 1.5,
label.box = TRUE,
repel = TRUE,
raster = FALSE) +
labs(title = "Author", x = "UMAP 1", y = "UMAP 2") +
theme(legend.position = "none")
combined <- cowplot::plot_grid(p1, p2, p3, p4, ncol = 2, nrow = 2)
ggsave(plot = combined, filename = file.path(PATH, "results/umaps/stromal_rpca_annot_04.png"), height = 8, width = 9)
combined
endothelial <- c("PLVAP", "CLDN5")
mural <- c("RGS5", "ACTA2", "PDGFRB")
fibroblasts <- c("COL1A1", "DCN", "LUM")
mesothelial <- c("KRT19", "MSLN", "CALB2")
prolif_stromal <- c("STMN1", "TOP2A", "MKI67")
glial <- c("GPM6B", "CDH19")
pan_cancer_stromal_sigs <- readRDS(file.path(PATH, "data/signatures/stromal/ye_2024/pan_cancer_stromal_sigs.rds"))
pan_cancer_stromal_sigs <- lapply(pan_cancer_stromal_sigs, function(x) x[x %in% rownames(strom_rpca)])
strom_sigs <- readRDS(file.path(PATH, "/data/signatures/stromal/wu_embo_2020/strom_sigs.rds"))
strom_sigs <- lapply(strom_sigs, function(x) x[x %in% rownames(strom_rpca)])
Plot_Density_Custom(strom_rpca, reduction = "umap.rpca", features = endothelial)
Endothelial subpopulations
names(pan_cancer_stromal_sigs)[str_detect(names(pan_cancer_stromal_sigs), "ECs")]
## [1] "Aerocytes ECs" "Arterial ECs" "CD14+ circECs"
## [4] "Capillaries ECs" "FOS+ Capillaries ECs" "ISG15+ ECs"
## [7] "Immature ECs" "Lymphatics ECs" "Venous ECs"
## [10] "Venous IL6+ ECs"
ec_sub_sigs <- pan_cancer_stromal_sigs[str_detect(names(pan_cancer_stromal_sigs), "ECs")]
ec_sub_sigs_top4 <- lapply(ec_sub_sigs, function(x) x[1:4])
Plot_Density_Custom(strom_rpca, reduction = "umap.rpca", features = ec_sub_sigs_top4$`Aerocytes ECs`)
Plot_Density_Custom(strom_rpca, reduction = "umap.rpca", features = ec_sub_sigs_top4$`Arterial ECs`)
Plot_Density_Custom(strom_rpca, reduction = "umap.rpca", features = ec_sub_sigs_top4$`CD14+ circECs`)
Plot_Density_Custom(strom_rpca, reduction = "umap.rpca", features = ec_sub_sigs_top4$`Capillaries ECs`)
Plot_Density_Custom(strom_rpca, reduction = "umap.rpca", features = ec_sub_sigs_top4$`FOS+ Capillaries ECs`)
Plot_Density_Custom(strom_rpca, reduction = "umap.rpca", features = ec_sub_sigs_top4$`ISG15+ ECs`)
Plot_Density_Custom(strom_rpca, reduction = "umap.rpca", features = ec_sub_sigs_top4$`Immature ECs`)
Plot_Density_Custom(strom_rpca, reduction = "umap.rpca", features = ec_sub_sigs_top4$`Lymphatics ECs`)
Plot_Density_Custom(strom_rpca, reduction = "umap.rpca", features = ec_sub_sigs_top4$`Venous ECs`)
Plot_Density_Custom(strom_rpca, reduction = "umap.rpca", features = ec_sub_sigs_top4$`Venous IL6+ ECs`)
Plot_Density_Custom(strom_rpca, reduction = "umap.rpca", features = mural)
Mural subpopulations
names(pan_cancer_stromal_sigs)[str_detect(names(pan_cancer_stromal_sigs), "SMCs|PCs")]
## [1] "ATF3+ PCs" "ATF3+ SMCs" "CCL19+ PCs" "ECM PCs"
## [5] "FABP4+ PCs" "Fibrogenic PCs" "HTRA3+ PCs" "ISG15+ PCs"
## [9] "RERGL high SMCs" "RERGL low SMCs" "SERPINE1+ PCs" "Vascular PCs"
mural_sub_sigs <- pan_cancer_stromal_sigs[str_detect(names(pan_cancer_stromal_sigs), "SMCs|PCs")]
mural_sub_sigs_top4 <- lapply(mural_sub_sigs, function(x) x[1:4])
Plot_Density_Custom(strom_rpca, reduction = "umap.rpca", features = strom_sigs$ipvl[1:4])
Plot_Density_Custom(strom_rpca, reduction = "umap.rpca", features = strom_sigs$dpvl[1:4])
Plot_Density_Custom(strom_rpca, reduction = "umap.rpca", features = mural_sub_sigs_top4$`ATF3+ PCs`)
Plot_Density_Custom(strom_rpca, reduction = "umap.rpca", features = mural_sub_sigs_top4$`ATF3+ SMCs`)